import OAUTH_ROUTER from '@/oauth';
import ControlPanel_Index from '@/views/controlPanel/index.vue';
import ControlPanel_Login from '@/views/controlPanel/login.vue';
import ControlPanel_LoginLogs from '@/views/controlPanel/loginLogs.vue';
import Root from '@/views/root.vue';
import {RouteConfig} from 'vue-router';

export const ROUTERS = [{
  path: '/',
  name: 'home',
  component: Root,
  redirect: {
    name: 'ControlPanel_PersonalData'
  },
  meta: {
    displayName: '主页',
    hidden: true
  }
}, {
  path: '/ControlPanel',
  name: 'ControlPanel',
  component: Root,
  children: [{
    path: '/ControlPanel',
    name: 'ControlPanel_PersonalData',
    component: ControlPanel_Index,
    meta: {
      displayName: '个人资料',
      hidden: true
    }
  }, {
    path: '/ControlPanel/LoginLogs',
    name: 'ControlPanel_LoginLogs',
    component: ControlPanel_LoginLogs,
    meta: {
      displayName: '登录记录',
      hidden: true
    }
  }],
  meta: {
    displayName: '控制面板',
    hidden: true
  }
}, {
  path: '/ControlPanel/Login',
  name: 'ControlPanel_Login',
  component: ControlPanel_Login,
  meta: {
    displayName: '登录页',
    hidden: true
  }
}, OAUTH_ROUTER] as RouteConfig[];
